package com.whmall.service.crm.enumeration;

/**
 * @author Esion
 * @since 2021/12/6
 */
public enum LogoutReasonEnum {

    // 1
    COMPANY_CANCELLATION(1, "公司注销"),
    COMPANY_TRANSFORMATION(2, "公司转型"),
    NOT_REACH_CONTACT(3, "无法联系到联系人");

    private final Integer value;
    private final String name;

    LogoutReasonEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(Integer value) {
        for (LogoutReasonEnum item : values()) {
            if (item.getValue().equals(value)) {
                return item.getName();
            }
        }
        return "";
    }

}
